package com.hxzy.controller.anonymous.sms.req;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @Author wy
 * @Description 验证码有效性
 * @Date 2023/9/6 10:00
 * @Version 1.0
 */
@Getter
@Setter
@ToString
public class ValidateSMSReq {

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "0?(13|15|17|18|14|19)[0-9]{9}",message = "手机号码格式不正确，只支持(13|14|15|17|18|19)开头的")
    private String phone;

    @NotBlank(message = "验证码不能为空")
    private String code;
}
